package com.example.java.source;

import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

public class MySelfSourceMain {
    public static void main(String[] args) throws Exception {
        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
        // 有并行的source
//        DataStreamSource<String> data = env.addSource(new MyParallelSource());

        // 没有并行的source
        DataStreamSource<String> data = env.addSource(new MyNoParallelSource());

        data.print();
        env.execute();

    }
}
